//构造函数对象初始化 string 类型
#include<bits/stdc++.h>
using namespace std;
class Student
{
public:
    Student();
    Student(int,string,char);
private:
    int num;
    string name;
    char sex;
public:
    void set_data(int n,string p,char s);
    void display();
};
Student::Student()
{
    num=18;
    name="Chen";
    sex='f';
}
Student::Student(int n,string p,char s)
{
    num=n;
    name=p;
    sex=s;
}
void Student::set_data(int n,string p,char s)
{
    num=n;
    name=p;
    sex=s;
}
void Student::display()
{
    cout<<"num:"<<num<<endl;
    cout<<"name:"<<name<<endl;
    cout<<"sex:"<<sex<<endl<<endl;
}
int  main(){
    Student stud1;
    Student stud2(16,"Yang",'m');
    stud1.display();
    stud2.display();
}